import 'package:flutter/material.dart';

class DetailPage extends StatefulWidget {
  DetailPage({Key key}) : super(key: key);
  @override
  _DetailPageState createState() => _DetailPageState();
}

class _DetailPageState extends State<DetailPage> {
  @override
  Widget build(BuildContext context) {
    var args = ModalRoute.of(context).settings.arguments as Map;
    return DefaultTabController(
        length: 2,
        child: Scaffold(
          appBar: AppBar(
            title: Text('DetailPage'),
            bottom: TabBar(
              tabs: [
                Tab(
                  text: '热门',
                ),
                Tab(
                  text: '推荐',
                ),
              ],
            ),
          ),
          // body: Center(child: Text('DetailPage ${args['name']}')),
          body: TabBarView(
            children: [
              ListView(
                children: [
                  ListTile(
                    title: Text('aaa'),
                  ),
                  ListTile(
                    title: Text('aaa'),
                  ),
                  ListTile(
                    title: Text('aaa'),
                  ),
                ],
              ),
              ListView(
                children: [
                  ListTile(
                    title: Text('bbb'),
                  ),
                  ListTile(
                    title: Text('bbb'),
                  ),
                  ListTile(
                    title: Text('bbb'),
                  ),
                ],
              ),
            ],
          ),
        ));
  }
}
